--------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  C:\Users\wb614536\Downloads\replication\replication\code\../outputs/16_AttritionDocs_log.txt
  log type:  text
 opened on:  25 Jun 2026, 13:03:51
r; t=0.00 13:03:51

. 
. include "_OutcomeLabels.do"

. /*==============================================================================
>   _OutcomeLabels.do  (helper, not run on its own)
> 
>   Defines polished, publication-ready labels for every outcome that appears
>   in figures and tables. Labels use the macro pattern `lbl_<outcome>`.
>   Visualization do files `include` this file and reference `lbl_<outcome>`
>   to print a pretty label rather than the raw Stata variable name.
> 
>   Categorical/binary indicators are suffixed with "[=1]" so the reader sees
>   what a unit change means; counts and continuous variables get explicit
>   units; standardized indices are flagged "(SD)".
> 
>   Sandra Rozo
> ==============================================================================*/
. 
. * ---- Economic well-being -----------------------------------------------------
. local lbl_jeea_index_wellbeing  "Well-being index (SD)"
r; t=0.00 13:03:51

. local lbl_labour_income         "Log monthly labor income"
r; t=0.00 13:03:51

. local lbl_gasto_capita          "Log per-capita HH consumption"
r; t=0.00 13:03:51

. local lbl_income_maxhh          "Log HH-max labor income"
r; t=0.00 13:03:51

. local lbl_employed              "Employed [=1]"
r; t=0.00 13:03:51

. 
. * ---- Labor ------------------------------------------------------------------
. local lbl_jeea_index_labor      "Labor index (SD)"
r; t=0.00 13:03:51

. local lbl_formal                "Formal employment [=1]"
r; t=0.00 13:03:51

. local lbl_hora_semana           "Log weekly hours (salaried)"
r; t=0.00 13:03:51

. 
. * ---- Services and rights ----------------------------------------------------
. local lbl_jeea_index_services   "Services index (SD)"
r; t=0.00 13:03:51

. local lbl_sisben                "SISBEN registration [=1]"
r; t=0.00 13:03:51

. local lbl_subs                  "Subsidized health [=1]"
r; t=0.00 13:03:51

. local lbl_bank                  "Savings account [=1]"
r; t=0.00 13:03:51

. local lbl_has_bank_account      "Bank account (incl. savings) [=1]"
r; t=0.00 13:03:51

. local lbl_govtr                 "Govt. transfers [=1]"
r; t=0.00 13:03:51

. 
. * ---- Health -----------------------------------------------------------------
. local lbl_health_pca            "Health PCA index (SD)"
r; t=0.00 13:03:51

. local lbl_anx_depr              "Severe anxiety/depression [=1]"
r; t=0.00 13:03:51

. local lbl_any_anx_depr          "Any anxiety/depression [=1]"
r; t=0.00 13:03:51

. local lbl_vas_score             "Self-rated health (0-100)"
r; t=0.00 13:03:51

. local lbl_phys_problem          "Physical health problem [=1]"
r; t=0.00 13:03:51

. local lbl_chronic_illness       "Chronic illness [=1]"
r; t=0.00 13:03:51

. local lbl_mh_index              "Mental-health composite (SD)"
r; t=0.00 13:03:51

. local lbl_life_satisfaction     "Life satisfaction (0-10)"
r; t=0.00 13:03:51

. local lbl_hi5_inv               "EQ-5D anx/depr (5-low to 1-high)"
r; t=0.00 13:03:51

. 
. * ---- Food security ----------------------------------------------------------
. local lbl_index_food            "Food security index (SD)"
r; t=0.00 13:03:51

. local lbl_skip_meals            "Skipped meals last month [=1]"
r; t=0.00 13:03:51

. local lbl_went_without_food     "Went without food [=1]"
r; t=0.00 13:03:51

. local lbl_protein_days          "Days w/ protein (last week)"
r; t=0.00 13:03:51

. local lbl_food_insecure_seek    "Sought food assistance [=1]"
r; t=0.00 13:03:51

. 
. * ---- Housing ----------------------------------------------------------------
. local lbl_index_housing         "Housing quality index (SD)"
r; t=0.00 13:03:51

. local lbl_adequate_housing      "Adequate housing [=1]"
r; t=0.00 13:03:51

. local lbl_has_electricity       "Has electricity [=1]"
r; t=0.00 13:03:51

. local lbl_has_water             "Has running water [=1]"
r; t=0.00 13:03:51

. local lbl_has_sewage            "Has sewage [=1]"
r; t=0.00 13:03:51

. 
. * ---- Integration ------------------------------------------------------------
. local lbl_index_integration     "Integration index (SD)"
r; t=0.00 13:03:51

. local lbl_belonging             "Sense of belonging (1-4)"
r; t=0.00 13:03:51

. local lbl_feel_integrated       "Feels integrated (1-4)"
r; t=0.00 13:03:51

. local lbl_trust_col             "Trust in Colombians (out-group, 1-5)"
r; t=0.00 13:03:51

. local lbl_trust_ven             "Trust in Venezuelans (in-group, 1-5)"
r; t=0.00 13:03:51

. local lbl_general_trust         "General trust in people (1-5)"
r; t=0.00 13:03:51

. local lbl_venezuelans_help_me   "Venezuelans help me (1-5)"
r; t=0.00 13:03:51

. local lbl_trust_index           "Prosocial behaviors composite (SD)"
r; t=0.00 13:03:51

. local lbl_col_friends           "Number Colombian friends"
r; t=0.00 13:03:51

. local lbl_community_org         "Belongs to community org [=1]"
r; t=0.00 13:03:51

. local lbl_connection_colombia   "Strong connection to Colombia [=1]"
r; t=0.00 13:03:51

. local lbl_colombians_help_me    "Colombians help me (1-5)"
r; t=0.00 13:03:51

. local lbl_count_on_col          "Can count on Colombians (1-5)"
r; t=0.00 13:03:51

. 
. * ---- Discrimination ---------------------------------------------------------
. local lbl_index_discrim         "Discrimination index (SD)"
r; t=0.00 13:03:51

. local lbl_discrim_ever          "Ever discriminated against [=1]"
r; t=0.00 13:03:51

. local lbl_discrim_freq          "Discrimination frequency (1-5)"
r; t=0.00 13:03:51

. local lbl_filed_complaint       "Filed discrimination complaint [=1]"
r; t=0.00 13:03:51

. 
. * ---- Migration intentions ---------------------------------------------------
. local lbl_intend_stay           "Intends to stay in Colombia [=1]"
r; t=0.00 13:03:51

. local lbl_plan_stay_5yr         "Plans to stay 5+ years [=1]"
r; t=0.00 13:03:51

. local lbl_considered_return_ven "Considered returning to Venezuela [=1]"
r; t=0.00 13:03:51

. 
. * ---- COVID -----------------------------------------------------------------
. local lbl_index_covid           "COVID resilience index (SD)"
r; t=0.00 13:03:51

. local lbl_covid_income_down     "Income fell during COVID [=1]"
r; t=0.00 13:03:51

. local lbl_covid_eviction        "Faced eviction during COVID [=1]"
r; t=0.00 13:03:51

. local lbl_covid_received_aid    "Received COVID aid [=1]"
r; t=0.00 13:03:51

. 
. * ---- Education -------------------------------------------------------------
. local lbl_currently_studying    "Currently studying [=1]"
r; t=0.00 13:03:51

. local lbl_currently_enrolled    "Currently enrolled in school [=1]"
r; t=0.00 13:03:51

. local lbl_degree_validated      "Foreign degree validated [=1]"
r; t=0.00 13:03:51

. 
. * ---- Children --------------------------------------------------------------
. local lbl_child_skip_meals      "Child skipped meals [=1]"
r; t=0.00 13:03:51

. local lbl_child_vaccinated      "Child vaccinated [=1]"
r; t=0.00 13:03:51

. local lbl_child_worked          "Child worked [=1]"
r; t=0.00 13:03:51

. 
. * ---- Remittances -----------------------------------------------------------
. local lbl_index_remit           "Remittances index (SD)"
r; t=0.00 13:03:51

. local lbl_remit_now             "Sends remittances now [=1]"
r; t=0.00 13:03:51

. local lbl_remit_to_parents      "Remits to parents [=1]"
r; t=0.00 13:03:51

. 
. * ---- Financial access and digital ------------------------------------------
. local lbl_index_fin_access      "Financial access index (SD)"
r; t=0.00 13:03:51

. local lbl_index_digital         "Digital access index (SD)"
r; t=0.00 13:03:51

. local lbl_has_savings_account   "Has savings account [=1]"
r; t=0.00 13:03:51

. local lbl_has_mobile_money      "Has mobile money [=1]"
r; t=0.00 13:03:51

. local lbl_has_smartphone        "Has smartphone [=1]"
r; t=0.00 13:03:51

. local lbl_has_internet          "Has internet [=1]"
r; t=0.00 13:03:51

. local lbl_apps_whatsapp         "Uses WhatsApp [=1]"
r; t=0.00 13:03:51

. 
. * ============================================================================
. *  PREDETERMINED COVARIATES (used for balance tests and as RD controls)
. * ============================================================================
. 
. * ---- Demographics ----------------------------------------------------------
. local lbl_female                "Female [=1]"
r; t=0.00 13:03:51

. local lbl_age_panel             "Age (years)"
r; t=0.00 13:03:51

. local lbl_yrseduc               "Years of education"
r; t=0.00 13:03:51

. local lbl_time_col              "Years in Colombia"
r; t=0.00 13:03:51

. local lbl_child_venez           "Has child born in Venezuela [=1]"
r; t=0.00 13:03:51

. 
. * ---- Pre-migration economic conditions (in Venezuela) ----------------------
. local lbl_jobopp                "Had a job offer in Colombia [=1]"
r; t=0.00 13:03:51

. local lbl_labven                "Worked in Venezuela [=1]"
r; t=0.00 13:03:51

. local lbl_typeworkven1          "Worked in agric./manual (VZ) [=1]"
r; t=0.00 13:03:51

. local lbl_typeworkven2          "Worked in services (VZ) [=1]"
r; t=0.00 13:03:51

. local lbl_typeworkven3          "Worked in skilled occ. (VZ) [=1]"
r; t=0.00 13:03:51

. local lbl_written_cont          "Had written contract (VZ) [=1]"
r; t=0.00 13:03:51

. local lbl_average               "Avg. days worked / week (VZ)"
r; t=0.00 13:03:51

. local lbl_smartven              "Owned smartphone in VZ [=1]"
r; t=0.00 13:03:51

. local lbl_owner                 "Homeowner in VZ [=1]"
r; t=0.00 13:03:51

. local lbl_electven              "Had electricity in VZ [=1]"
r; t=0.00 13:03:51

. local lbl_waterven              "Had running water in VZ [=1]"
r; t=0.00 13:03:51

. local lbl_sewageven             "Had sewage in VZ [=1]"
r; t=0.00 13:03:51

. 
. * ---- Family / migration network -------------------------------------------
. local lbl_hhven_parents         "Parents born in VZ [=1]"
r; t=0.00 13:03:51

. local lbl_hhven_spouse          "Spouse born in VZ [=1]"
r; t=0.00 13:03:51

. local lbl_hhven_other           "Other HH members born in VZ [=1]"
r; t=0.00 13:03:51

. local lbl_healthmig             "Healthy at migration [=1]"
r; t=0.00 13:03:51

. local lbl_frdfam                "Network in Colombia [=1]"
r; t=0.00 13:03:51

. r; t=0.01 13:03:51

. 
. /*------------------------------------------------------------------
>   SAMPLE SETUP: JEEA-style sample, Wave 1, with a panel flag
> ------------------------------------------------------------------*/
. 
. use "$clean/PEP_Analysis_Sample.dta", clear
(PEP analysis sample (JEEA-style + extended outcome indices))
r; t=0.12 13:03:51

. local jeea_controls hhven_spouse hhven_other jobopp labven typeworkven1 ///
>                     typeworkven2 typeworkven3 written_cont average yrseduc ///
>                     healthmig frdfam smartven owner electven waterven ///
>                     sewageven female age_panel child_venez time_col
r; t=0.00 13:03:51

. 
. * JEEA-style restrictions (so the analysis sample matches the body)
. gen sample_roster = .
(13,580 missing values generated)
r; t=0.00 13:03:51

. qui reg trt_hh `jeea_controls'
r; t=2.50 13:03:53

. replace sample_roster = e(sample)
(13,580 real changes made)
r; t=0.00 13:03:53

. replace sample_roster = 0 if gasto_capita == . & trt_hh != .
(119 real changes made)
r; t=0.00 13:03:53

. replace sample_roster = 0 if employed == . & trt_hh != .
(88 real changes made)
r; t=0.00 13:03:53

. replace sample_roster = 0 if hora_semana == . & trt_hh != . & asalariado_num == 1
(64 real changes made)
r; t=0.00 13:03:53

. replace sample_roster = 0 if anx_depr == .
(2 real changes made)
r; t=0.00 13:03:53

. replace sample_roster = 0 if health_pca == .
(8 real changes made)
r; t=0.00 13:03:53

. bysort family_id wave_num: egen sample_reg = max(sample_roster)
r; t=0.01 13:03:53

. keep if (orden == 1 | orden == 2) & sample_reg == 1
(6,604 observations deleted)
r; t=0.02 13:03:53

. 
. * Construct an "in W2" indicator at the household level: an HH is in W2
. * if any roster member shows up with wave_num == 2.
. bysort family_id: egen in_w2 = max(wave_num == 2)
r; t=0.01 13:03:53

. bysort family_id: egen in_w1 = max(wave_num == 1)
r; t=0.01 13:03:53

. 
. * Eligibility (D = 1 if arrived strictly before the deadline)
. gen elig = (date < 0)
r; t=0.00 13:03:53

. 
. * Keep one observation per household for retention statistics
. preserve
r; t=0.02 13:03:53

. keep if wave_num == 1
(2,659 observations deleted)
r; t=0.02 13:03:53

. bysort family_id: keep if _n == 1
(2,006 observations deleted)
r; t=0.01 13:03:53

. 
. count
  2,311
r; t=0.00 13:03:53

. local n_w1 = r(N)
r; t=0.00 13:03:53

. 
. count if in_w2 == 1
  1,400
r; t=0.00 13:03:53

. local n_panel = r(N)
r; t=0.00 13:03:53

. 
. count if in_w2 == 0
  911
r; t=0.00 13:03:53

. local n_attrited = r(N)
r; t=0.00 13:03:53

. 
. local rate_panel  = string(`n_panel' / `n_w1' * 100, "%5.1f")
r; t=0.00 13:03:53

. local rate_attrit = string(`n_attrited' / `n_w1' * 100, "%5.1f")
r; t=0.00 13:03:53

. 
. di ""

r; t=0.00 13:03:53

. di "  W1 households (JEEA sample):       `n_w1'"
  W1 households (JEEA sample):       2311
r; t=0.00 13:03:53

. di "  Re-interviewed in W2 (panel):     `n_panel'  (`rate_panel'%)"
  Re-interviewed in W2 (panel):     1400  (60.6%)
r; t=0.00 13:03:53

. di "  Attrited between W1 and W2:       `n_attrited'  (`rate_attrit'%)"
  Attrited between W1 and W2:       911  (39.4%)
r; t=0.00 13:03:53

. 
. * Retention by eligibility
. qui sum in_w2 if elig == 1
r; t=0.00 13:03:53

. local rate_elig = string(r(mean) * 100, "%5.1f")
r; t=0.00 13:03:53

. local n_elig    = r(N)
r; t=0.00 13:03:53

. 
. qui sum in_w2 if elig == 0
r; t=0.00 13:03:53

. local rate_inelig = string(r(mean) * 100, "%5.1f")
r; t=0.00 13:03:53

. local n_inelig    = r(N)
r; t=0.00 13:03:53

. 
. di "  Retention | Eligible:               `rate_elig'%  (n=`n_elig')"
  Retention | Eligible:               62.0%  (n=563)
r; t=0.00 13:03:53

. di "  Retention | Ineligible:             `rate_inelig'%  (n=`n_inelig')"
  Retention | Ineligible:             60.1%  (n=1748)
r; t=0.00 13:03:53

. 
. * Sharp RD coefficient on in_w2: does eligibility predict retention?
. capture rdrobust in_w2 date, c(0) p(1) kernel(triangular) bwselect(mserd)
r; t=0.21 13:03:54

. local rd_b  = string(e(tau_cl), "%6.3f")
r; t=0.00 13:03:54

. local rd_se = string(e(se_tau_cl), "%6.3f")
r; t=0.00 13:03:54

. local rd_p  = string(e(pv_cl), "%6.3f")
r; t=0.00 13:03:54

. local rd_h  = string(e(h_l), "%5.1f")
r; t=0.00 13:03:54

. local rd_n  = e(N_h_l) + e(N_h_r)
r; t=0.00 13:03:54

. 
. di "  Sharp-RD on in_w2:  coef=`rd_b' (`rd_se'), p=`rd_p', h=`rd_h', n_eff=`rd_n'"
  Sharp-RD on in_w2:  coef=-0.067 (0.100), p=0.507, h=72.1, n_eff=560
r; t=0.00 13:03:54

. restore
r; t=0.00 13:03:54

. 
. /*------------------------------------------------------------------
>   PANEL A SUMMARY TABLE
> ------------------------------------------------------------------*/
. 
. file open T using "$atab/tabA_attrition_summary.tex", write replace text
r; t=0.02 13:03:54

. file write T "\begin{table}[!htbp]" _n
r; t=0.00 13:03:54

. file write T "\centering" _n
r; t=0.00 13:03:54

. file write T "\caption{Panel retention between Wave 1 (2020) and Wave 2 (2021)}" _n
r; t=0.00 13:03:54

. file write T "\label{tab:attrition_summary}" _n
r; t=0.00 13:03:54

. file write T "\begin{threeparttable}" _n
r; t=0.00 13:03:54

. file write T "\begin{tabular}{lc}" _n
r; t=0.00 13:03:54

. file write T "\toprule" _n
r; t=0.00 13:03:54

. file write T " & Households \\" _n
r; t=0.00 13:03:54

. file write T "\midrule" _n
r; t=0.00 13:03:54

. file write T "\multicolumn{2}{l}{\textit{Panel A. Retention counts}} \\" _n
r; t=0.00 13:03:54

. file write T "Wave 1 households (JEEA-style sample)              & `n_w1' \\" _n
r; t=0.00 13:03:54

. file write T "Re-interviewed in Wave 2 (panel sub-sample)       & `n_panel' (`rate_panel'\%) \\" _n
r; t=0.00 13:03:54

. file write T "Attrited between Wave 1 and Wave 2                 & `n_attrited' (`rate_attrit'\%) \\" _n
r; t=0.00 13:03:54

. file write T "\midrule" _n
r; t=0.00 13:03:54

. file write T "\multicolumn{2}{l}{\textit{Panel B. Retention rate by eligibility status}} \\" _n
r; t=0.00 13:03:54

. file write T "Retention rate, eligible (\$D=1\$) households    & `rate_elig'\% \\" _n
r; t=0.00 13:03:54

. file write T "Retention rate, ineligible (\$D=0\$) households  & `rate_inelig'\% \\" _n
r; t=0.00 13:03:54

. file write T "Difference (eligible \$-\$ ineligible)           & `=string(real("`rate_elig'") - real("`rate_inelig
> '"), "%5.1f")' pp \\" _n
r; t=0.00 13:03:54

. file write T "\midrule" _n
r; t=0.00 13:03:54

. file write T "\multicolumn{2}{l}{\textit{Panel C. Sharp-RD on the panel-membership indicator}} \\" _n
r; t=0.00 13:03:54

. file write T "Discontinuity at cutoff (eligibility \$\to\$ in panel)  & `rd_b' \\" _n
r; t=0.00 13:03:54

. file write T "Standard error                                     & (`rd_se') \\" _n
r; t=0.00 13:03:54

. file write T "\$p\$-value                                       & `rd_p' \\" _n
r; t=0.00 13:03:54

. file write T "Effective N (within bandwidth)                    & `rd_n' \\" _n
r; t=0.00 13:03:54

. file write T "MSE-optimal bandwidth (days)                       & `rd_h' \\" _n
r; t=0.00 13:03:54

. file write T "\bottomrule" _n
r; t=0.00 13:03:54

. file write T "\end{tabular}" _n
r; t=0.00 13:03:54

. file write T "\begin{tablenotes}\footnotesize" _n
r; t=0.00 13:03:54

. file write T "\item \textit{Notes}: Panel A reports household-level counts in the JEEA-style analysis sample. Pane
> l B reports the share of Wave-1 households re-interviewed in Wave 2 separately for eligible (date $<0$, arrived st
> rictly before the RAMV deadline of June 8, 2018) and ineligible households. Panel C reports a sharp-RD estimate on
>  the panel-membership indicator: it tests whether being re-interviewed in Wave 2 jumps discontinuously at the elig
> ibility cutoff. A small or insignificant coefficient indicates that differential attrition at the cutoff (the rele
> vant identifying margin) is not a first-order concern; the worst-case Lee~(2009) bounds reported in Table~\ref{tab
> :leebounds_full} provide a complementary sensitivity check." _n
r; t=0.00 13:03:54

. file write T "\end{tablenotes}" _n
r; t=0.00 13:03:54

. file write T "\end{threeparttable}" _n
r; t=0.00 13:03:54

. file write T "\end{table}" _n
r; t=0.00 13:03:54

. file close T
r; t=0.00 13:03:54

. 
. di "  tabA_attrition_summary.tex saved"
  tabA_attrition_summary.tex saved
r; t=0.00 13:03:54

. 
. /*------------------------------------------------------------------
>   COVARIATE COMPARISON: W1 FULL VS PANEL SUB-SAMPLE
> ------------------------------------------------------------------*/
. 
. use "$clean/PEP_Analysis_Sample.dta", clear
(PEP analysis sample (JEEA-style + extended outcome indices))
r; t=0.12 13:03:54

. gen sample_roster = .
(13,580 missing values generated)
r; t=0.00 13:03:54

. qui reg trt_hh `jeea_controls'
r; t=2.44 13:03:56

. replace sample_roster = e(sample)
(13,580 real changes made)
r; t=0.00 13:03:56

. replace sample_roster = 0 if gasto_capita == . & trt_hh != .
(119 real changes made)
r; t=0.00 13:03:56

. replace sample_roster = 0 if employed == . & trt_hh != .
(88 real changes made)
r; t=0.00 13:03:56

. replace sample_roster = 0 if hora_semana == . & trt_hh != . & asalariado_num == 1
(64 real changes made)
r; t=0.00 13:03:56

. replace sample_roster = 0 if anx_depr == .
(2 real changes made)
r; t=0.00 13:03:56

. replace sample_roster = 0 if health_pca == .
(8 real changes made)
r; t=0.00 13:03:56

. bysort family_id wave_num: egen sample_reg = max(sample_roster)
r; t=0.01 13:03:56

. keep if (orden == 1 | orden == 2) & sample_reg == 1
(6,604 observations deleted)
r; t=0.02 13:03:56

. 
. bysort family_id: egen in_w2 = max(wave_num == 2)
r; t=0.01 13:03:56

. keep if wave_num == 1
(2,659 observations deleted)
r; t=0.01 13:03:56

. bysort family_id: keep if _n == 1
(2,006 observations deleted)
r; t=0.02 13:03:56

. 
. local desc_vars female age_panel yrseduc time_col jobopp labven ///
>                 typeworkven1 typeworkven2 typeworkven3 written_cont ///
>                 smartven owner waterven sewageven ///
>                 hhven_spouse hhven_other healthmig frdfam child_venez
r; t=0.00 13:03:56

. local pep_vars  pep trt_hh
r; t=0.00 13:03:56

. 
. file open B using "$atab/tabA_attrition_balance.tex", write replace text
r; t=0.03 13:03:56

. file write B "\begin{table}[!htbp]" _n
r; t=0.00 13:03:56

. file write B "\centering" _n
r; t=0.00 13:03:56

. file write B "\caption{Pre-migration characteristics and PEP-RAMV take-up: W1 full sample versus panel sub-sample}
> " _n
r; t=0.00 13:03:56

. file write B "\label{tab:attrition_balance}" _n
r; t=0.00 13:03:56

. file write B "\begin{threeparttable}" _n
r; t=0.00 13:03:56

. file write B "\begin{tabular}{lcccc}" _n
r; t=0.00 13:03:56

. file write B "\toprule" _n
r; t=0.00 13:03:56

. file write B " & W1 full & Panel sub-sample & Difference & \$p\$-value \\" _n
r; t=0.00 13:03:56

. file write B " & (1) & (2) & (2)\$-\$(1) & \\" _n
r; t=0.00 13:03:56

. file write B "\midrule" _n
r; t=0.00 13:03:56

. file write B "\multicolumn{5}{l}{\textit{Panel A. Pre-migration characteristics}} \\" _n
r; t=0.00 13:03:56

. 
. foreach v of local desc_vars {
  2.     capture confirm variable `v'
  3.     if _rc continue
  4.     local pretty "`lbl_`v''"
  5.     if "`pretty'" == "" {
  6.         local pretty : variable label `v'
  7.         if "`pretty'" == "" local pretty "`v'"
  8.     }
  9.     qui sum `v'
 10.     if r(N) == 0 continue
 11.     local m_full = r(mean)
 12.     local n_full = r(N)
 13.     qui sum `v' if in_w2 == 1
 14.     local m_pan = r(mean)
 15.     local n_pan = r(N)
 16.     capture qui regress `v' in_w2
 17.     if _rc {
 18.         local pval .
 19.     }
 20.     else {
 21.         local pval = 2 * (1 - normal(abs(_b[in_w2] / _se[in_w2])))
 22.     }
 23.     local diff = `m_pan' - `m_full'
 24.     file write B "`pretty'" ///
>         " & `=string(`m_full', "%6.3f")'" ///
>         " & `=string(`m_pan',  "%6.3f")'" ///
>         " & `=string(`diff',   "%6.3f")'" ///
>         " & " "[`=string(`pval', "%5.3f")']" " \\" _n
 25. }
r; t=0.17 13:03:57

. 
. file write B "\midrule" _n
r; t=0.00 13:03:57

. file write B "\multicolumn{5}{l}{\textit{Panel B. PEP-RAMV take-up}} \\" _n
r; t=0.00 13:03:57

. 
. * PEP take-up rows (individual PEP and household PEP)
. foreach v of local pep_vars {
  2.     capture confirm variable `v'
  3.     if _rc continue
  4.     if "`v'" == "pep"    local pretty "PEP-RAMV (individual) [=1]"
  5.     if "`v'" == "trt_hh" local pretty "PEP-RAMV (any HH member) [=1]"
  6.     qui sum `v'
  7.     if r(N) == 0 continue
  8.     local m_full = r(mean)
  9.     qui sum `v' if in_w2 == 1
 10.     local m_pan = r(mean)
 11.     capture qui regress `v' in_w2
 12.     if _rc {
 13.         local pval .
 14.     }
 15.     else {
 16.         local pval = 2 * (1 - normal(abs(_b[in_w2] / _se[in_w2])))
 17.     }
 18.     local diff = `m_pan' - `m_full'
 19.     file write B "`pretty'" ///
>         " & `=string(`m_full', "%6.3f")'" ///
>         " & `=string(`m_pan',  "%6.3f")'" ///
>         " & `=string(`diff',   "%6.3f")'" ///
>         " & " "[`=string(`pval', "%5.3f")']" " \\" _n
 20. }
r; t=0.02 13:03:57

. 
. file write B "\midrule" _n
r; t=0.00 13:03:57

. * Joint F test on covariates
. capture qui reg in_w2 `desc_vars'
r; t=0.01 13:03:57

. local jt_F = e(F)
r; t=0.00 13:03:57

. local jt_p = Ftail(e(df_m), e(df_r), e(F))
r; t=0.00 13:03:57

. file write B "Joint \$F\$-test (covariates)" ///
>     " & \multicolumn{2}{c}{}" ///
>     " & `=string(`jt_F', "%6.3f")'" ///
>     " & " "[`=string(`jt_p', "%5.3f")']" " \\" _n
r; t=0.00 13:03:57

. file write B "\bottomrule" _n
r; t=0.00 13:03:57

. file write B "\end{tabular}" _n
r; t=0.00 13:03:57

. file write B "\begin{tablenotes}\footnotesize" _n
r; t=0.00 13:03:57

. file write B "\item \textit{Notes}: Means of pre-migration characteristics and PEP-RAMV take-up among heads and sp
> ouses (\textit{orden} \$\\in \\{1,2\\}\$) in the JEEA-style Wave-1 analysis sample. \textit{Panel A} reports the p
> redetermined covariates; \textit{Panel B} reports the individual and household PEP-RAMV indicators measured in Wav
> e~1. Column~(1) reports the mean in the full Wave-1 sample; column~(2) reports the mean in the panel sub-sample (W
> ave-1 households re-interviewed in Wave~2); column~(3) is the difference; column~(4) reports the two-sided \$p\$-v
> alue from a regression of the panel-membership indicator on the row variable. The bottom row reports the joint \$F
> \$-test \$p\$-value from a single regression of the panel-membership indicator on all the predetermined covariates
>  listed in Panel~A. Differential attrition at the eligibility cutoff is reported in Table~\ref{tab:attrition_summa
> ry} Panel~C." _n
r; t=0.00 13:03:57

. file write B "\end{tablenotes}" _n
r; t=0.00 13:03:57

. file write B "\end{threeparttable}" _n
r; t=0.00 13:03:57

. file write B "\end{table}" _n
r; t=0.00 13:03:57

. file close B
r; t=0.00 13:03:57

. 
. di "  tabA_attrition_balance.tex saved"
  tabA_attrition_balance.tex saved
r; t=0.00 13:03:57

. 
. log close
      name:  <unnamed>
       log:  C:\Users\wb614536\Downloads\replication\replication\code\../outputs/16_AttritionDocs_log.txt
  log type:  text
 closed on:  25 Jun 2026, 13:03:57
--------------------------------------------------------------------------------------------------------------------
